#!/bin/bash

echo "🚀 启动企业级后台管理系统 - 后端服务"
echo "================================================"

# 检查虚拟环境
if [ ! -d "venv" ]; then
    echo "❌ 虚拟环境不存在，请先运行: bash setup.sh"
    exit 1
fi

# 激活虚拟环境
echo "⚡ 激活虚拟环境..."
source venv/bin/activate

# 启动服务
echo "🌐 启动FastAPI服务..."
echo "访问地址: http://localhost:8000"
echo "API文档: http://localhost:8000/docs"
echo ""
echo "按 Ctrl+C 停止服务"
echo ""

python start.py